﻿namespace StateTheater.Models
{
    public class NameDetails
    {
        public string FirstName { get; set; }

        public string LastName { get; set; }

		private string fullName = string.Empty;
        public string FullName 
		{
			get
			{
				if (string.IsNullOrEmpty(fullName))
				{
				if (!string.IsNullOrEmpty(FirstName))
					fullName = FirstName + " ";

				if (!string.IsNullOrEmpty(LastName))
					fullName += LastName;
				}
				return fullName;
			}
//			set; 
		}

        public int ID { get; set; }

        public bool HasBio { get; set; }

        public bool HasPhoto { get; set; }



        /// <summary>
        /// Gets or sets the name used for SEO.
        /// </summary>
        /// <value>The name of the SEO.</value>
        /// <remarks>This is not loaded automatically.  Must be set manually by nd.SEOName = Util.SEOEscape(nd.FullName)
		///  (This assembly doesn't know about Util class, so it must be set externally.)
        /// </remarks>
        public string SEOName { get; set; }

		/// <summary>
		/// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
		/// </summary>
		/// <returns>
		/// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
		/// </returns>
        public override string ToString()
        {
            return LastName + ", " + FirstName;
        }
    }
}
